package java8;

import java.util.HashMap;

public class HashMapTest3 {
    public static void main(String[] args) {
        HashMap<String, String> map = new HashMap<>();
        map.put("1", "1");
        map.put("2", "2");
        map.forEach((a, b) -> { // java.util.ConcurrentModificationException
            System.out.println(a + b);
            map.remove(a);
        });

    }
}
